package com.cn.stepLock.chain;

import com.cn.stepLock.exception.MessageException;

import java.util.List;
import java.util.concurrent.LinkedBlockingQueue;

/**
 * @author Aaron
 * @desc
 * @createTime 2022-02-24 4:55
 * @since
 */
public class ConstentChain extends AbstartChain implements Chain{


    LinkedBlockingQueue<Task> linkedBlockingQueue = new LinkedBlockingQueue<>();

    @Override
    void start(){
        throw new MessageException("this chain does not support thread function");
    }

    void offer(Task task){
        linkedBlockingQueue.offer(task);
    }

    @Override
    void stop() {
        throw new MessageException("this chain does not support thread function");
    }

    @Override
    public void executeTask(Task task) {

    }

    @Override
    public void executeTaskList(List<Task> taskList) {
        throw new MessageException("this chain does not support thread function");
    }
}
